package com.inspur.cmis.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.inspur.cmis.mapper.UserMapper;
import com.inspur.cmis.pojo.User;
import com.inspur.cmis.service.UserService;
@Service("userService")
public class UserServiceImpl implements UserService{
	@Autowired
    private UserMapper userMapper;
	
	/**
	 * 用户登录查询
	 */
	public User getUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.getUser(user);
	}

	/**
	 * 用户的默认查询
	 */
	public List<User> getUserList(Map map) {
		// TODO Auto-generated method stub
		return userMapper.getUserList(map);
	}


	public List<User> getAllUserList() {
		
		return userMapper.getAllUserList();
	}


	public void deleteUser(int[] userIds) {
		// TODO Auto-generated method stub
		userMapper.deleteUser(userIds);
	}

	@Override
	public void UserOpen(int[] userIds) {
		userMapper.UserOpen(userIds);
		
	}
	public void UserClose(int[] userIds) {
		userMapper.UserClose(userIds);
		
	}

	 public void UserReset(int userIds[])
	 {userMapper.UserReset(userIds);};
	 public void addUser(User user) {
		 userMapper.addUser(user);
	 }
	 public List<User> getUserByUserName(String username){
		return  userMapper.getUserByUserName(username);
	 }
	 public User getUserById(int id) {
		 return userMapper.getUserById(id);
	 }

	@Override
	public void updateUser(User user) {
		 userMapper.updateUser(user);
		
	}

	@Override
	public void importUser(List<User> userList) {
		userMapper.importUser(userList);
	}
}
